
<dl class="n-box">
	<dt class="n-box-head">
		<div class="n-right">
			<?=n_ui(n_url('site', 'addMenu'),"添加菜单")?>
		</div>
		<b>菜单分类</b>
	</dt>
	<dd class="n-box-body">
		
		<?php
			$categories = $data['categories'];
			$detail = $data['detail'];
			$category = $data['category'];
		?>
		<!--
		<select>
			<?php foreach ($categories as $value):?>
				<option><?=$value['name']?></option>
			<?php endforeach;?>
		</select>- 管理 
		-->
		
		<?php if (count($detail) > 0):?>
		<table class="n-table n-size-full n-sep-top">
			<tbody>
			<tr>
				<th>序权</th>
				<th>ID</th>
				<th>菜单名称</th>
				<th>Url</th>
				<th>状态</th>
				<th>打开方式</th>
				<th>操作</th>
			</tr>
			<?php foreach ($detail as $value):?>
				<tr>
					<td><?=$value['dorder']?></td>
					<td><?=$value['id']?></td>
					<td><?=$value['name']?></td>
					<td><a href="<?=$value['url']?>"><?=$value['url']?></a></td>
					<td><?=$value['status'] == 'On' ? '显示' : '不显示'?></td>
					<td><?=$value['blank'] == 'Y' ? '新窗口打开' : '默认方式打开'?></td>
					<td>
						<?=n_ui(n_url('site', 'menuEdit', ['cid'=>$category['id'],'did'=>$value['id']]),"编辑")?>
						<?=n_ui(n_url('site', 'menuDel', ['cid'=>$category['id'],'did'=>$value['id']]),"删除")?>
					</td>
				</tr>
			<?php endforeach;?>
			</tbody>
		</table>
		<?php endif;?>
	</dd>
</dl>
